﻿using ERP.Domain.Products;
using Product.API.ISerivces.DTOS;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Product.API.ISerivces.Bom
{
    /// <summary>
    /// Bom管理服务接口
    /// </summary>
    public interface IBomSerivces
    {
        /// <summary>
        /// Bom添加
        /// </summary>
        /// <param name="entity">实体</param>
        /// <returns>返回受影响行数</returns>
        Task<int> CreateBom(BomInfo entity);

        /// <summary>
        /// Bom删除
        /// </summary>
        /// <param name="Id">主键ID</param>
        /// <returns>返回受影响行数</returns>
        Task<int> DeleteBom(int Id);

        /// <summary>
        /// Bom修改
        /// </summary>
        /// <param name="entity">实体</param>
        /// <returns>返回受影响行数</returns>
        Task<int> UpdateBom(BomInfo entity);

        /// <summary>
        /// 物料配件批量添加
        /// </summary>
        /// <param name="materialStructuer">物料配件</param>
        /// <returns>返回受影响函数</returns>
        Task<int> BatchCreateMaterial(List<BatchCreateMaterialStructuerDTO> materialStructuer, Guid BomNumber);

        /// <summary>
        /// 产品用料批量添加
        /// </summary>
        /// <param name="productMaterial">产品物料</param>
        /// <returns>返回受影响行数</returns>
        Task<int> BatchCreateProductMaterial(List<BatchCreateProductMaterialDTO> productMaterial, Guid ProductNumber, string SerialNumber);

        /// <summary>
        /// 物料配件批量修改
        /// </summary>
        /// <param name="materialStructuer">物料配件</param>
        /// <param name="BomNumber">BOM编号</param>
        /// <returns>返回受影响函数</returns>
        Task<int> BatchUpdateMaterial(List<BatchUpdateMaterialStructuerDTO> materialStructuer, Guid BomNumber);

        /// <summary>
        /// 产品用料批量修改
        /// </summary>
        /// <param name="productMaterial">产品物料</param>
        /// <param name="ProductNumber">产品编号</param>
        /// <returns>返回受影响行数</returns>
        Task<int> BatchUpdateProductMaterial(List<BatchUpdateProductMaterialDTO> productMaterial, Guid ProductNumber, string SerialNumber);


    }
}
